package com.woniuxy.controller;


import com.woniuxy.entity.Category;
import com.woniuxy.service.CategoryService;
import com.woniuxy.utils.ResponseResults;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Resource
    private CategoryService categoryService;

    @GetMapping("/all")
    public ResponseResults<List<Category>> add(){
        return categoryService.add();
    }



}
